// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false

//引入echarts画图工具
import * as echarts from 'echarts';
import china from 'echarts/map/json/china.json'
echarts.registerMap('china', china)
Vue.prototype.$echarts = echarts

// 注册axios为全局属性
// axios 配置
import axios from 'axios'
axios.defaults.withCredentials = true;// 允许跨域携带cookie
axios.defaults.timeout = 50000;
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=utf-8';

//本地前端访问服务器的后端要加上注释，服务器前端访问服务器后端要去掉注释
// axios.defaults.baseURL = 'https://follwup.cmas2020.cn'
// axios.defaults.baseURL = 'https://follwup-test.cmas2020.cn'

//本地前端访问本地后端去掉注释
//  axios.defaults.baseURL = 'http://localhost:8013/'

Vue.prototype.$axios = axios;

//导入样式
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import { Message } from 'element-ui';
Vue.prototype.$message = Message;
Vue.use(ElementUI);

// 引入图标
import 'font-awesome/css/font-awesome.min.css'

//引入文本编辑器
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(VueQuillEditor)

import global_ from "./components/global/store"
Vue.prototype.GLOBAL = global_//挂载到Vue实例上面,引入全局权限

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  render: h => h(App),
  // 解决跨域问题
}).$mount('#app');
